package com.zhouyu.exampledesignmoudle.adapter;

/**
 * @Description:
 */
public class AdapterTest {

    private Target target;

    /**
     * 之前的方法
     */
    public void oldPrint() {
        AdapteeCanon adapteeCanon = new AdapteeCanon();
        adapteeCanon.toPrint();
    }

    /**
     * 兼容了两种打印机
     */
    public void newPrint(Target target) {
        target = new AdapterDeli();
        target.todoOne();

        target = new AdapterCannon();
        target.todoOne();
    }
}
